{extend name="public/base" /} {block name="body"}
<div class="content-tabs">
	<ol class="breadcrumb">
		<li>
			<a href="{:url('index/index')}"><i class="fa fa-home"></i></a>
		</li>
		<li>
			<strong>入库管理</strong>
		</li>
	</ol>
</div>
<div class="ibox float-e-margins">
	<div class="ibox-content">
		<form id="myForm" class="form-horizontal m-t" method="post" action="{:url('detail')}">	
			<div class="form-group" style="padding-left: 20px;">
				商品名称 <input type="text" id="name" name="name" value="" placeholder="请输入商品名称" class="bank" />
				单号 <input type="text" id="log_sn" name="log_sn" value="" placeholder="请输入入库单号" class="bank" />
				<span class="bank"><button type="submit" class="btn btn-sm btn-primary"><li class="fa fa-search"> 查询</li></button> </span>
			</div>
		</from>
		<div class="hr-line-dashed"></div>
            <div class="example-wrap">
				<div class="example">				
					<table class="table table-bordered table-hover">
						<thead>
							<tr class="long-th">    
                            	<th>类型</th>
                                <th>单号</th>
                                <th>商品名称</th>
                                <th>出入库数量</th>
                                <th>时间</th>
                            </tr>
                        </thead>
                        <tbody id="list" style="text-align: center;">
                        	{volist name="list" id="vo"}
                        	   <tr>
                        	   	<td>
                        	   		{if $vo.stocktype == 1}
                        	   		采购入库
                        	   		{elseif $vo.stocktype == 2}
                        	   		其他入库
                        	   		{elseif $vo.stocktype == 3}
                        	   		销售出库
                        	   		{elseif $vo.stocktype == 4}
                        	   		其他出库
                        	   		{/if}
                        	   	</td>
                        	   	<td>{$vo.sn}</td>
                        	   	<td>{$vo.goods_name}</td> 
                  	   			<td>
                        	   		{if $vo.type == 1}
                        	   		+{$vo.stock}
                        	   		{elseif $vo.type == 2}
                        	   		-{$vo.stock}
                        	   		{/if}
                        	   	</td>
                        	   	<td>{$vo.add_time}</td>                        	   		
                        	   </tr>
                        	{/volist}
                        </tbody>
                    </table>
                    <div style="text-align: right;">
                    	{$list->render()}
                    </div>
                </div>
            </div>
            </div>
</div>
{/block} {block name="script"}
<script src="__LIB__/datepicker/WdatePicker.js"></script>
<style>
.bank{
	width: 150px;
    height:30px;
    text-align:center;
    border-radius:5px;
}
</style>
{/block}